package com.ftg.learn.util;

/**
 * @author 布衣
 */
public enum TipUtil {

    TOKEN_ANALYZE_ERR_NOLOGIN(4001,"令牌解析错误，请先登陆以后再使用此功能")
    ,CART_ERROR_PRODUCT_NOT_EXIST(4002,"购物车中不存在此商品")
    ,CART_SUCCESS_LIST(200,"购物车列表获取成功")
    , CART_SUCCESS_ADD_PRODUCT(200, "购物车添加商品成功!!!"),
    CART_SUCCESS_UPDATE(200,"修改购买数量操作成功"),
    CART_SUCCESS_DELETE(200, "购物车删除商品成功"),
    CART_SUCCESS_CLEAR_ALL(200, "清空购物车"),
    LOGIN_USERNAME_IS_EMPTY(4003, "用户名不能为空"),
    LOGIN_PASSWORD_IS_EMPTY(4004, "密码不能为空"),
    LOGIN_USERNAME_ERROR(5001, "用户名不存在!!!"),
    LOGIN_PASSWORD_ERROR(5001, "密码错误，请重新尝试!!!"),
    LOGIN_SUCCESS(200, "登陆成功!!!"), TOKEN_PREFIX_ERROR(4005, "运行时异常 : ");

    private String msg;

    private Integer code;

    TipUtil(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
